import java.util.ArrayDeque;
import java.util.Deque;
import java.util.LinkedList;

/**
 * Created with Intellij IDEA
 * Description
 * User:ASUS
 * Date:2024-09-11
 * Time:21:13
 */
public class Queue {
    public static void main(String[] args) {
        Deque<Integer> stack=new ArrayDeque<>();//双端队列的线性实现

        java.util.Queue<Integer> queue=new LinkedList<>();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        System.out.println(queue.size());
        System.out.println(queue.peek());
        queue.poll();
        queue.peek();
        System.out.println(queue.poll());
        queue.poll();
        queue.peek();
        if(queue.isEmpty()){
            System.out.println("队列空");
        }else{
            System.out.println(queue.size());
        }
    }
}
